package base.util 
{
	import appkit.responders.NResponder;
	import base.GObject;
	import control.Manager;
	import flash.display.Sprite;
	import flash.events.Event;
	
	

	public class Debug extends Sprite 
	{
		private var manager:Manager;
		private var state:Text;
		private var campos:Text;
		private var camzoom:Text;
		private var mouse:Text;
		private var select:Text;
		
		private function on_enterframe(e:Event):void
		{
			/*
			state.update( String(manager.getState()));
			mouse.update( String(mouseX + ", " + mouseY));
			camzoom.update( String(manager.camera.scaleX));
			campos.update( String(manager.camera.x + ", " + manager.camera.y));
			if (manager.getSelected())
				select.update( String(manager.getSelected() + "  " + manager.getSelected().x + ", " + manager.getSelected().y));
			*/
		}
		
		private function init(e:Event):void
		{
			state = new Text(20, 380, "Event State: ");
			campos = new Text(20, 360, "Camera Coor: ");
			camzoom = new Text(20, 340, "Camera Zoom: ");
			mouse = new Text(20, 320, "Mouse: ");
			select = new Text(20, 300, "Selected: ");
			addChild(state);
			addChild(campos);
			addChild(camzoom);
			addChild(mouse);
			addChild(select);
			
			NResponder.addNative(this, Event.ENTER_FRAME, on_enterframe);
		}
		
		public function Debug(m:Manager) 
		{
			manager = m;
			NResponder.addNative(this, Event.ADDED_TO_STAGE, init, 1);
		}
		
	}

}